﻿using SqlSugar;
using System.Collections.Generic;

namespace IdentityServer4.SqlSugarCore.Entities
{
    [SugarTable("ApiScopes")]
    public class ApiScope
    {
        [SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
        public int Id { get; set; }
        public string Name { get; set; }
        public string DisplayName { get; set; }
        public string Description { get; set; }
        public bool Required { get; set; }
        public bool Emphasize { get; set; }
        public bool ShowInDiscoveryDocument { get; set; } = true;

        [SugarColumn(IsIgnore = true)]
        public List<ApiScopeClaim> UserClaims { get; set; }
        //public int ApiResourceId { get; set; }

        [SugarColumn(IsIgnore = true)]
        public ApiResource ApiResource { get; set; }
    }
}